import Vue from 'vue';
import Vuex from 'vuex';
import global from "@common/store/global";
import modules from './modules.js';
import createPersistedState from 'vuex-persistedstate'

Vue.use(Vuex);
const vuexPersisted = new createPersistedState({
    key: global.state.vuexName,
    storage: window.sessionStorage
});
export default new Vuex.Store({
    ...global,
    modules,
    plugins: [ vuexPersisted ]
});
